#include "wordindex.h"

using namespace qWordCards;

WordIndex::WordIndex() :
		_word(""),
		_offset(-1),
		_size(0) {
	
}

WordIndex::WordIndex(QString word, unsigned long int offset, unsigned long int size) :
	_word(word),
	_offset(offset),
	_size(size) {
};

WordIndex::WordIndex(const char* word, unsigned long int offset, unsigned long int size) :
		_word(word),
		_offset(offset),
		_size(size) {
}

WordIndex::WordIndex(const WordIndex& index) :
		_word(index._word),
		_offset(index._offset),
		_size(index._size) {
}

WordIndex::~WordIndex() {
}

bool WordIndex::operator==(const WordIndex& index) const {
	return _word == index._word && _offset == index._offset && _size == index._size;
}

WordIndex& WordIndex::operator=(const WordIndex& index) {
	_word = index._word;
	_size = index._size;
	_offset = index._offset;
	return *this;
}

QString WordIndex::GetWord() const {
	return _word;
}

unsigned long int WordIndex::GetOffset() const {
	return _offset;
}

unsigned long int WordIndex::GetSize() const {
	return _size;
}
